<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <title>小组成员管理</title>
    <script src="js/members.js"></script>
</head>
<body onload="loadMembers()">
<h1>小组成员管理</h1>

<h2>成员列表</h2>
<table border="1">
    <thead>
    <tr>
        <th>用户名</th>
        <th>学号</th>
        <th>姓名</th>
        <th>备注</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody id="memberList"></tbody>
</table>

<h2>添加成员</h2>
<form id="addMemberForm" onsubmit="return addMember(event)">
    <label for="newUsername">用户名：</label>
    <input id="newUsername" required type="text"><br><br>

    <label for="newPassword">密码（学号）：</label>
    <input id="newPassword" required type="password"><br><br>

    <label for="newName">姓名：</label>
    <input id="newName" required type="text"><br><br>

    <label for="newName">备注：</label>
    <input id="note" required type="text"><br><br>
    <button type="submit">添加成员</button>
</form>
<br><br>
<h2>根据用户名查询</h2>
<label for="usernameInput"></label>
<input id="usernameInput" placeholder="请输入用户名" type="text">
<button id="confirmButton" onclick="getMemberByUsername()">确认</button>
<div id="result"></div>
</body>
</html>
